<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {if $admin.site_id>0}

    {else /}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Site_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-site_id" data-rule="required" data-source="user/user/index" data-params='{"custom[is_siter]":"1"}' data-field="sitename" class="form-control selectpage" name="row[site_id]" type="text" value="{$row.site_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-params='{"custom[is_siter]":"0"}' data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Postcontent')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-postcontent" data-rule="required" class="form-control editor" rows="5" name="row[postcontent]" cols="50">{$row.postcontent|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Publishdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="publishdataList" item="vo"}
            <label for="row[publishdata]-{$key}"><input id="row[publishdata]-{$key}" name="row[publishdata]" type="radio" value="{$key}" {in name="key" value="$row.publishdata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Recommenddata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="recommenddataList" item="vo"}
            <label for="row[recommenddata]-{$key}"><input id="row[recommenddata]-{$key}" name="row[recommenddata]" type="radio" value="{$key}" {in name="key" value="$row.recommenddata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hotdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="hotdataList" item="vo"}
            <label for="row[hotdata]-{$key}"><input id="row[hotdata]-{$key}" name="row[hotdata]" type="radio" value="{$key}" {in name="key" value="$row.hotdata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Topdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="topdataList" item="vo"}
            <label for="row[topdata]-{$key}"><input id="row[topdata]-{$key}" name="row[topdata]" type="radio" value="{$key}" {in name="key" value="$row.topdata"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reading')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reading" data-rule="required" class="form-control" name="row[reading]" type="number" value="{$row.reading|htmlentities}">
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Good')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-good" data-rule="required" class="form-control" name="row[good]" type="number" value="{$row.good|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Comment')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-comment" data-rule="required" class="form-control" name="row[comment]" type="number" value="{$row.comment|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Publishtime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-publishtime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[publishtime]" type="text" value="{:$row.publishtime?datetime($row.publishtime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
